package cn.tedu.batch.transformation

import org.apache.flink.api.scala.ExecutionEnvironment

/**
 * @author Amos
 * @date 2022/5/19
 */

object BatchDistinctDemo {
  def main(args: Array[String]): Unit = {
    val env = ExecutionEnvironment.getExecutionEnvironment

    import org.apache.flink.api.scala._
    val source = env.fromElements(("java", 1), ("java", 1),
                                  ("scala", 2), ("scala", 2),
                                  ("java", 2))
    source.distinct(0).print("first:")
    source.distinct().print()
  }

}
